package com.xmtlxx.wms.mapper;

import com.xmtlxx.common.annotation.DataColumn;
import com.xmtlxx.common.annotation.DataPermission;
import com.xmtlxx.common.core.mapper.BaseMapperPlus;
import com.xmtlxx.wms.domain.StoreLog;
import com.xmtlxx.wms.domain.bo.StoreLogBo;
import com.xmtlxx.wms.domain.vo.StoreLogVo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 仓库日志Mapper接口
 *
 * @author xmtlxx
 * @date 2022-08-15
 */
public interface StoreLogMapper extends BaseMapperPlus<StoreLogMapper, StoreLog, StoreLogVo> {
    /**
     * 根据条件分页查询仓库日志
     *
     * @param storeLog 仓库日志
     * @return Page StoreLog
     */
    @DataPermission({
        @DataColumn(key = "tenantName", value = "s.create_by"),
        @DataColumn(key = "deptName", value = "s.dept_id"),
        @DataColumn(key = "userName", value = "s.create_by")
    })
    Page<StoreLogVo> selectPageStoreLogList(@Param("page") Page<StoreLog> page,@Param("storeLog") StoreLogBo storeLog);

    /**
     * 查询仓库日志列表
     *
     * @param storeLog 仓库日志
     * @return 仓库日志集合
     */
    @DataPermission({
        @DataColumn(key = "tenantName", value = "s.create_by"),
        @DataColumn(key = "deptName", value = "s.dept_id"),
        @DataColumn(key = "userName", value = "s.create_by")
    })
    List<StoreLogVo> selectStoreLogList(@Param("storeLog") StoreLogBo storeLog);

    StoreLogVo selectStoreLogVoByID(String id);
}
